home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 May: Tool Chest / Developer CD Series Tool Chest (Apple Computer)(May 1999).iso / Tool Chest / Games / Game Sample Code / ZAM 1.0a13 / CoreSource / WindowDispatch.c < prev   
Encoding:
C/C++ Source or Header  |  1993-09-16  |  547 b   |  37 lines  |  [TEXT/KAHL]

  1. #include "CoreGlobals.h"
  2.  
  3.  
  4. Handle    GetWData(WindowPtr    wp)
  5. {
  6.     return (Handle)GetWRefCon(wp);
  7. }
  8.  
  9.  
  10. void SetWData(WindowPtr    wp, Handle data)
  11. {
  12.     SetWRefCon(wp,(long)data);
  13. }
  14.  
  15. WindowPtr NewDispatchWindow(short ID)
  16. /*
  17.     This routine will create a window and allocate the event handler pointers
  18. */
  19. {
  20.     wDispHandle        disp;
  21.     WindowPeek        wp;
  22.     
  23.     
  24.     /* Get the window template */
  25.     if(gColorQD)
  26.         wp = (WindowPeek)GetNewCWindow(ID,nil,(WindowPtr)-1L);
  27.         
  28.     ShowWindow(wp);
  29.     
  30.     return (WindowPtr)wp;
  31. }
  32.  
  33. void DisposeDispatchWindow(WindowPeek wp)
  34. {
  35.     DisposeWindow(wp);
  36. }
  37.